﻿using System;
using UnityEngine;

namespace EchoFramework
{
    /// <summary>
    /// 框架基类，只要是游戏物体，都需继承该类
    /// </summary>
    public class ObjectBase : MonoBehaviour
    {
        protected virtual void OnAwake()
        {
        }

        private void Awake()
        {
            OnAwake();
        }

        protected virtual void OnStart()
        {
        }

        private void Start()
        {
            OnStart();
        }

        public virtual void OnUpdate()
        {
        }

        public virtual void OnFixedUpdate()
        {
        }

        protected virtual void OnClose()
        {
        }

        private void OnDestroy()
        {
            OnClose();
        }
    }
}